EventTarget

interface EventTarget

Represents an event target that is able to process events, for example, a DOM node.

Provides methods to manage event listeners and dispatch events.

Inheritors

Functions

Link copied to clipboard
abstract fun addEventListener(eventType: EventType, listener: Observer<Event>, useCapture: Boolean)
Adds the given listener to the event target.
Link copied to clipboard
abstract fun dispatch(event: Event): Boolean
Dispatches the given event at the current event target.
Link copied to clipboard
abstract fun eventListeners(eventType: EventType, useCapture: Boolean): List<Observer<Event>>
Returns the immutable list of event listeners that listen events of the given eventType in a phase that corresponds the given useCapture.
Link copied to clipboard
abstract fun removeEventListener(eventType: EventType, listener: Observer<Event>, useCapture: Boolean)
Removes the given listener from the event target.